package com.moli.iov.handle.alarm.enums;

/**
 * <p>
 * 是否非防抖  true 防抖  false 不防抖
 * </p>
 *
 * @author: zql
 * @Date: 2019/2/22 13:04
 */
public enum AntiShakeEnum {

    /**
     * 防抖
     */
    YES( true, "防抖"),

    /**
     * 不防
     */
    NO(false, "不防抖");

    private boolean flag;

    private String msg;

    AntiShakeEnum(boolean flag, String msg){
        this.flag = flag;
        this.msg = msg;
    }

    public static String getMsg(boolean flag){
        for(AntiShakeEnum e : AntiShakeEnum.values()){
            if(e.flag == flag){
                return e.msg;
            }
        }
        return "";
    }

    public boolean getFlag() {
        return flag;
    }


    public String getMsg() {
        return msg;
    }

}
